---
layout: search
---
<div class="row">
  <div class="col-sm-9">
    <form action="/search.html" method="get">
      <div class="form-group row">
        <div class="col-md-11">
          <input type="text" class="form-control" id="search-box" name="query" placeholder="请输入关键字">
        </div>
        <div class="col-md-1">
          <button type="submit" class="btn btn-success float-sm-right">搜索</button>
        </div>
      </div>
    </form>
    <ul id="search-results" style="list-style-type:none;margin:0;padding:0;"></ul>
  </div>
</div>
<script>
  window.store = {
    {% for post in site.posts %}
      "{{ post.url | slugify }}": {
        "title": "{{ post.title | xml_escape }}",
        "author": "{{ post.author | xml_escape }}",
        "category": "{{ post.category | xml_escape }}",
        "content": {{ post.content | strip_html | strip_newlines | jsonify }},
        "url": "{{ post.url | xml_escape }}"
      }
      {% unless forloop.last %},{% endunless %}
    {% endfor %}
  };
</script>
<script src="/assets/js/lunr.min.js"></script>
<script src="/assets/js/search.js"></script>
